package work;

public class Fib {
    public static void main(String[] args) {
        int []a=new int[30];
        a[0] = 1;
        a[1] = 1;
        for(int i = 2;i < 30;i++){
            a[i] = a[i - 1] + a[i - 2];
        }
        System.out.println("前30项如下:");
        for(int i = 0;i < 30;i++){
            if((i + 1) % 6 == 0){
                System.out.println();
            }
            System.out.printf("%10d",a[i]);
        }
    }
}
